package edu.unu.iist.ts2es.transformer;

import java.io.IOException;

import javax.xml.parsers.ParserConfigurationException;

import org.xml.sax.SAXException;

import edu.unu.iist.ts2es.util.EventStructure;
import edu.unu.iist.ts2es.util.GraphML;
import edu.unu.iist.ts2es.util.TransitionSystem;

public abstract class ATransformer<V,E> {
	
	public abstract EventStructure unfolding(TransitionSystem<V, E> transys);
	
	public EventStructure unfoldingFromFile(String file) throws Exception{
		long startTime = System.currentTimeMillis();
		EventStructure result = unfolding(new TransitionSystem(GraphML
					.getGraphML(file)));
		long endTime = System.currentTimeMillis();
		System.out.println("time: "+ (endTime-startTime)+ " (ms).");
		return result;
	}
	
}
